package com.bianguo.android.iocdemo.view.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.bianguo.android.recyclerlibrary.RViewHelper;
import com.bianguo.android.recyclerlibrary.SwipeRefreshHelper;
import com.bianguo.android.recyclerlibrary.adapter.RViewAdapter;
import com.bianguo.android.recyclerlibrary.listener.RViewCreate;

public abstract class BaseRVActivity extends BaseActivity implements RViewCreate, SwipeRefreshHelper.SwipeRefreshListener {

    protected RViewHelper rViewHelper;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        RViewHelper rViewHelper = new RViewHelper.Builder(this, this).build();
    }

    @Override
    public SwipeRefreshLayout createSwipeRefreshLayout() {
        return null;
    }

    @Override
    public int[] colorRes() {
        return new int[0];
    }

    @Override
    public RecyclerView.LayoutManager createLayoutManager() {
        return new LinearLayoutManager(this);
    }

    @Override
    public RecyclerView.ItemDecoration createItemDecoration() {
        return new DividerItemDecoration(this, LinearLayoutManager.VERTICAL);
    }

    @Override
    public int starPageNumber() {
        return 1;
    }

    @Override
    public boolean isSupportPaging() {
        return false;
    }
}
